package com.chen.cloudpicture;

import org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;

// 关闭 shardingsphere 配置 bean 的加载，用来关闭分库分表，同时要改 DynamicShardingManager 类
@SpringBootApplication(exclude = {ShardingSphereAutoConfiguration.class})
// @SpringBootApplication
@EnableAsync // 开启异步调用
@MapperScan("com.chen.cloudpicture.mapper")
@EnableAspectJAutoProxy(exposeProxy = true) // 开启AOP代理 (如 AopContext.currentProxy()获取代理类避免事务失效)
public class CloudPictureApplication {

    public static void main(String[] args) {
        SpringApplication.run(CloudPictureApplication.class, args);
    }

}
